<?php

namespace app\admin\controller;

use app\common\BaseHelper;

use think\Request;

class Setting extends Base
{

    public function _initialize() {
        parent::_initialize();
        $this->model = 'villages';
        $this->defaultWhere = ['id'=>session('ADMIN')['villageId']];
        $this->redirect = 'admin/setting/index';
    }

    public function index(){
        $row = model($this->model)->where($this->defaultWhere)->find();
        $this->assign('row',$row);
        return $this->fetch($this->indexView);
    }

    public function editPost(Request $request, $redirect='') {
        return parent::editPost($request, $this->redirect);
    }

}